<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../../../vue.js"></script>
    <script src="../../../vue-router_3.0.2.js"></script>
</head>

<body>
    <div class="box">
        <router-link to='/pppppppp'>pppppppp</router-link>
        <router-link to='/hhhhhhhh'>hhhhhhhh</router-link>


        <router-View></router-View>

    </div>
    <script>
        const pppppppp = {
            template: `<div>
                        <h1>pppppppp</h1>
                    </div>`
        }
        const hhhhhhhh = {
            template: `<div>
                        <h1>hhhhhhhh</h1>
                    </div>`
        }

        const router = new VueRouter({
            routes: [{
                path: '/pppppppp',
                component: pppppppp
            }, {
                path: '/hhhhhhhh',
                component: hhhhhhhh
            }, {
                path: '/',
                redirect: '/pppppppp'
            }, ]
        })

        let vm = new Vue({
            el: '.box',
            data: {},
            router
        })
    </script>
</body>

</html>